<!--导航栏、包括登陆后头像显示-->

<header class="bg-white-only header header-md navbar navbar-fixed-top-xs">
    <div class="navbar-header aside bg-info nav-xs">
        <a class="btn btn-link visible-xs" data-toggle="class:nav-off-screen,open" data-target="#nav,html">
            <i class="icon-list"></i>
        </a>
        <a href="/" class="navbar-brand text-lt">
            <!--<i class="icon-earphones"></i>-->
            <img src="/static/images/makerlogo.png">
            <img src="/static/images/logo.png" alt="." class="hide">
            <span class="hidden-nav-xs m-l-sm">maker</span>
        </a>
        <a class="btn btn-link visible-xs" data-toggle="dropdown" data-target=".user">
            <i class="icon-settings"></i>
        </a>
    </div>      <ul class="nav navbar-nav hidden-xs">
    <li>
        <a href="#nav,.navbar-header" data-toggle="class:nav-xs,nav-xs" class="text-muted">
            <i class="fa fa-indent text"></i>
            <i class="fa fa-dedent text-active"></i>
        </a>
    </li>
</ul>
    <div class="navbar-right ">
        <ul class="nav navbar-nav m-n hidden-xs nav-user user">
            #if(name!=null)
            <li class="hidden-xs">
                <a href="#" class="dropdown-toggle lt" data-toggle="dropdown">
                    <i class="icon-bell"></i>
                    #if(news.size()>0)
                    <span class="badge badge-sm up bg-danger count">${news.size()}</span>
                    #end
                </a>
                <section class="dropdown-menu aside-xl animated fadeInUp" id="header_news">
                    <section class="panel bg-white news">
                        <div class="panel-heading b-light bg-light">
                            #if(news.size()>0)
                            <strong>你有 <span class="count">${news.size()}</span> 通知</strong>
                            #else
                            <strong>暂无通知</strong>
                            #end
                        </div>
                        <div class="list-group list-group-alt">
                            #set(h=0)
                            #for(LeaveWord new1 : news)
                            #if(h<=8)
                            <a class="media list-group-item header_n" v-for="n in" data-toggle="popover" data-html="true" data-placement="left" data-content="<div class='scrollable hrefcontent'style='min-width:150px;min-height:40px;max-height:400px;font-size:15px;'>
                           <a href='/users/${name.m_id}?read=1#message'>$!{new1.l_content}</a></div>" title="" data-original-title="<button type=&quot;button&quot; class=&quot;close pull-right&quot; data-dismiss=&quot;popover&quot;>×</button>留言内容">
                                <span class="pull-left thumb-sm">
                                  <img src="/static/upload/img/${news_users[h].m_headPortrait}" style="width: 29px;height: 40px;border-radius: 5%;" alt="..." class="img-circle">
                                </span>
                                <span class="media-body block m-b-none">
                                  ${news_users[h].m_realname}给你留言了。<br>
                                  <small class="text-muted">${new1.l_time.substring(5,16)}</small>
                                </span>
                                <input type="hidden" id="messageid" value="${new1.l_id}">
                            </a>
                            <!--<button class="btn btn-sm btn-info" >Popover on top</button>-->
                            #end
                            #set(h=h+1)
                            #end
                            <!--<a href="/users/${name.m_id}" class="media list-group-item" v-for="n in">-->
                            <!--<span class="pull-left thumb-sm">-->
                            <!--<img src="/static/images/a0.png" alt="..." class="img-circle">-->
                            <!--</span>-->
                            <!--<span class="media-body block m-b-none">-->
                            <!--黄锦给你留言了。<br>-->
                            <!--<small class="text-muted">10 分钟之前</small>-->
                            <!--</span>-->
                            <!--</a>-->
                            <span class="media-body block m-b-none">
                                 #if(news.size()<=8)
                                  <a href="/users/${name.m_id}?read=1#message" class="media list-group-item" style="text-align: center;">
                                    点击查看所有留言
                                  </a>
                                #else
                                  <a href="/news" class="media list-group-item" style="text-align: center;">
                                    点击查看全部消息
                                  </a>
                                #end

                    </span>

                        </div>
                        <div class="panel-footer text-sm">
                            <span data-toggle="class:show animated fadeInRight">你共收到 ${allleaveWords.size()} 条留言, 有 ${news.size()} 条未阅读.</span>
                        </div>
                    </section>
                </section>
            </li>
            <li class="dropdown">
                <a href="#" class="dropdown-toggle bg clear" data-toggle="dropdown">
              <span class="thumb-sm avatar pull-right m-t-n-sm m-b-n-sm m-l-sm">
                <img src="/static/upload/img/${name.m_headPortrait}" class="head-icon" alt="...">
              </span>
                    ${name.m_realname} <b class="caret"></b>
                </a>
                <ul class="dropdown-menu animated fadeInRight">
                    <li>
                        <span class="arrow top"></span>
                        <a href="/users/${name.m_id}">个人中心</a>
                    </li>
                    <li>
                        <a href="/updatePassword">修改密码</a>
                    </li>
                    <li>
                        <a href="/news">
                            #if(news.size()>0)
                            <span class="badge bg-danger pull-right">${news.size()}</span>
                            #else
                            <span class="badge bg-default pull-right">0</span>
                            #end
                            通知
                        </a>
                    </li>
                    <li>
                        <a href="#">帮助</a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="/logout" >退出</a>
                    </li>
                </ul>
            </li>
            #else
            <li>
                <a href="/signin">登录</a>
            </li>
            <li>
                <a href="/signup">注册</a>
            </li>
            #end
        </ul>
    </div>
</header>